#!/usr/bin/env bash

deploy=$(dirname $0)

SLAVE_FILE=${deploy}/executors
SLAVE_NAMES=$(cat "$SLAVE_FILE" | sed  's/#.*$//;/^$/d')

for slave in ${SLAVE_NAMES} ; do
  echo "--------------- deploy to $slave ------------------"
  scp -r ${deploy}/../venus ${slave}:/opt/
  ssh ${slave} chmod 755 /opt/venus/bin/*.sh
  ssh ${slave} chown -R edw:edw /opt/venus
done